package com.base.moduleAI.controller;

import com.base.core.common.http.response.AjaxResult;
import com.base.moduleAI.entity.dto.AIPublishArticleDTO;
import com.base.moduleAI.service.IAIService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/virtual/AI")
public class AIController {


    @Resource
    private IAIService aiService;


    /**
     * 利用AI发布csdn博客
     * @param articleDTO 文章信息,关键词提示
     * @return 发布成功与否
     */
    @PostMapping("/publishCsdnBlog")
    public AjaxResult publishCsdnBlog(@RequestBody  AIPublishArticleDTO articleDTO ) {
        return aiService.publishCsdnBlog(articleDTO);
    }


}
